package ludoxia.classe
{
	import fl.core.UIComponent;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.DisplayObject;
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.net.URLRequest;
	import flash.utils.getDefinitionByName;
	
	import mx.flash.UIMovieClip;

	public class objet
	{
		
		public var SpriteObjet:UIComponent;
		private var swcClassType:Class;
		public var swcTreeComponent:treeNormal;
		public var swcLampadaireComponent:Lampadaire;
		public var swcBananeComponent:bananne;
		
		//private var _point:uint;
		private var _nom:String;
		
		public function objet(nom:String)
		{
			_nom = nom;	

			SpriteObjet = new UIComponent();			
			/*swcClassType = getDefinitionByName(nom) as Class;
			swcComponent = new swcClassType();
			DisplayObject(swcComponent).width = 80;
			DisplayObject(swcComponent).height = 80;
			SpriteObjet.addChild(swcComponent as DisplayObject);*/
			if (_nom == "treeNormal"){
				swcTreeComponent = new treeNormal();
				swcTreeComponent.width = 80;
				swcTreeComponent.height = 80;
				SpriteObjet.addChild(swcTreeComponent);
			}
			else if (_nom == "Lampadaire"){
				swcLampadaireComponent = new Lampadaire();
				swcLampadaireComponent.width = 80;
				swcLampadaireComponent.height = 80;
				SpriteObjet.addChild(swcLampadaireComponent);
			}
			else if (_nom == "bananne"){
				swcBananeComponent = new bananne();
				swcBananeComponent.width = 40;
				swcBananeComponent.height = 40;
				SpriteObjet.addChild(swcBananeComponent);
			}
			
		}
		
		/* Propriétés */
		public function get Nom():String{
			return _nom;
		}
		
		public function set Nom(value:String):void{
			_nom = value;
		}
		
		/* Fin Propriétés */
		
	}
}